package com.xuan.api;

import com.xuan.model.entity.User;
import com.xuan.model.respons.ResultBody;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

public interface AccountRemoteApi {

    @PostMapping("/login")
    public Map login(@RequestBody User user);

    @GetMapping("/findOne")
    User findOne(@RequestParam("username") String username);

    @PostMapping("/update")
    ResultBody updateRoles(@RequestBody User user);
}
